package com.example.choupaiapp.main.bean;

import android.text.TextUtils;

import com.example.choupaiapp.common.util.SharedPreferencesHelp;

import java.io.Serializable;

/**
 * Created by ASUS on 2019/12/4.
 */

public class ShareDataBean implements Serializable {

    /**
     * msg : success
     * code : 0
     * content : {"id":11583,"categoriesId":2,"userId":8770,"anonymity":1,"title":"茂业附近的单车摆放杂乱无章，看这好恐怖，共享单车的维护工作人员赶紧飞过来整整吧！","type":2,"urls":"http://qiniu.qmdl666.com/18734175394N201991991147594.jpg|http://qiniu.qmdl666.com/18734175394N201991991148674.jpg|http://qiniu.qmdl666.com/18734175394N201991991148290.jpg","createTime":"2019-09-19 09:11:50","deleteTime":null,"likeSum":18,"readSum":16,"shareSum":1,"commentSum":2,"address":"茂业百货(亲贤北街店)|山西省太原市小店区亲贤北街79号","longitude":112.573183,"latitude":37.83045,"status":0,"recommend":0,"commentList":null,"isAttention":null,"nickname":null,"avatar":null,"isLike":null}
     * url : https://www.baidu.com?id=11583
     */

    private String msg;
    private int code;
    private ContentBean content;
    private String url;

    public String getMsg() {
        return msg;
    }

    public void setMsg(String msg) {
        this.msg = msg;
    }

    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    public ContentBean getContent() {
        return content;
    }

    public void setContent(ContentBean content) {
        this.content = content;
    }

    public String getUrl() {
        UserInfoBean mUserInfoBean = (UserInfoBean) SharedPreferencesHelp.getBean("userInfo");
        if (mUserInfoBean != null) {
            return url + "&&inviteCode=" + mUserInfoBean.getUser().getInviteCode();
        } else {
            return url;
        }
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public static class ContentBean implements Serializable{
        /**
         * id : 11583
         * categoriesId : 2
         * userId : 8770
         * anonymity : 1
         * title : 茂业附近的单车摆放杂乱无章，看这好恐怖，共享单车的维护工作人员赶紧飞过来整整吧！
         * type : 2
         * urls : http://qiniu.qmdl666.com/18734175394N201991991147594.jpg|http://qiniu.qmdl666.com/18734175394N201991991148674.jpg|http://qiniu.qmdl666.com/18734175394N201991991148290.jpg
         * createTime : 2019-09-19 09:11:50
         * deleteTime : null
         * likeSum : 18
         * readSum : 16
         * shareSum : 1
         * commentSum : 2
         * address : 茂业百货(亲贤北街店)|山西省太原市小店区亲贤北街79号
         * longitude : 112.573183
         * latitude : 37.83045
         * status : 0
         * recommend : 0
         * commentList : null
         * isAttention : null
         * nickname : null
         * avatar : null
         * isLike : null
         */

        private int id;
        private int categoriesId;
        private int userId;
        private int anonymity;
        private String title;
        private int type;
        private String urls;
        private String createTime;
        private Object deleteTime;
        private int likeSum;
        private int readSum;
        private int shareSum;
        private int commentSum;
        private String address;
        private double longitude;
        private double latitude;
        private int status;
        private int recommend;
        private Object commentList;
        private Object isAttention;
        private Object nickname;
        private Object avatar;
        private Object isLike;

        public int getId() {
            return id;
        }

        public void setId(int id) {
            this.id = id;
        }

        public int getCategoriesId() {
            return categoriesId;
        }

        public void setCategoriesId(int categoriesId) {
            this.categoriesId = categoriesId;
        }

        public int getUserId() {
            return userId;
        }

        public void setUserId(int userId) {
            this.userId = userId;
        }

        public int getAnonymity() {
            return anonymity;
        }

        public void setAnonymity(int anonymity) {
            this.anonymity = anonymity;
        }

        public String getTitle() {
            if (!TextUtils.isEmpty(title)) {
                return title;
            }
            return ".";
        }

        public void setTitle(String title) {
            this.title = title;
        }

        public int getType() {
            return type;
        }

        public void setType(int type) {
            this.type = type;
        }

        public String getUrls() {
            return urls;
        }

        public void setUrls(String urls) {
            this.urls = urls;
        }

        public String getCreateTime() {
            return createTime;
        }

        public void setCreateTime(String createTime) {
            this.createTime = createTime;
        }

        public Object getDeleteTime() {
            return deleteTime;
        }

        public void setDeleteTime(Object deleteTime) {
            this.deleteTime = deleteTime;
        }

        public int getLikeSum() {
            return likeSum;
        }

        public void setLikeSum(int likeSum) {
            this.likeSum = likeSum;
        }

        public int getReadSum() {
            return readSum;
        }

        public void setReadSum(int readSum) {
            this.readSum = readSum;
        }

        public int getShareSum() {
            return shareSum;
        }

        public void setShareSum(int shareSum) {
            this.shareSum = shareSum;
        }

        public int getCommentSum() {
            return commentSum;
        }

        public void setCommentSum(int commentSum) {
            this.commentSum = commentSum;
        }

        public String getAddress() {
            return address;
        }

        public void setAddress(String address) {
            this.address = address;
        }

        public double getLongitude() {
            return longitude;
        }

        public void setLongitude(double longitude) {
            this.longitude = longitude;
        }

        public double getLatitude() {
            return latitude;
        }

        public void setLatitude(double latitude) {
            this.latitude = latitude;
        }

        public int getStatus() {
            return status;
        }

        public void setStatus(int status) {
            this.status = status;
        }

        public int getRecommend() {
            return recommend;
        }

        public void setRecommend(int recommend) {
            this.recommend = recommend;
        }

        public Object getCommentList() {
            return commentList;
        }

        public void setCommentList(Object commentList) {
            this.commentList = commentList;
        }

        public Object getIsAttention() {
            return isAttention;
        }

        public void setIsAttention(Object isAttention) {
            this.isAttention = isAttention;
        }

        public Object getNickname() {
            return nickname;
        }

        public void setNickname(Object nickname) {
            this.nickname = nickname;
        }

        public Object getAvatar() {
            return avatar;
        }

        public void setAvatar(Object avatar) {
            this.avatar = avatar;
        }

        public Object getIsLike() {
            return isLike;
        }

        public void setIsLike(Object isLike) {
            this.isLike = isLike;
        }
    }
}
